package com.task.web.controller.core;

import com.task.common.core.domain.AjaxResult;
import com.task.core.dto.request.DataFileUploadRequestDTO;
import com.task.core.service.AliyunOssService;
import io.swagger.annotations.Api;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;

import javax.annotation.Resource;
import java.io.IOException;
import java.net.URISyntaxException;
import com.task.common.core.domain.AjaxResult;

import static com.task.common.core.domain.AjaxResult.success;

@Api("阿里云OSS存储")
@RestController
@RequestMapping("/aliyunOss")
public class AliyunOssOperationController {

    @Resource
    AliyunOssService aliyunOssService;

    @RequestMapping("/importFile")
    public AjaxResult dataFileUpload(MultipartFile file ) {
        return success(aliyunOssService.uploadFile(file));
    }
}
